package com.iotechn.unimall.admin.api.print;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.PrintDO;
import com.iotechn.unimall.data.model.Page;

/**
 * 
 *
 * @author hct
 * @email 77802226@qq.com
 * @date 2020-04-08 19:04:12
 */
@HttpOpenApi(group = "admin.print", description = "")
public interface PrintService{

    @HttpMethod(description = "列表", permission = "admin:print:list", permissionParentName = "系统管理", permissionName = "打印设置")
    public Page<PrintDO> list(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "20") Integer limit,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "创建", permission = "admin:print:create", permissionParentName = "系统管理", permissionName = "打印设置")
    public PrintDO create(
            @NotNull @HttpParam(name = "printDO", type = HttpParamType.COMMON, description = "") PrintDO printDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "修改", permission = "admin:print:update", permissionParentName = "系统管理", permissionName = "打印设置")
    public String update(
            @NotNull @HttpParam(name = "printDO", type = HttpParamType.COMMON, description = "") PrintDO printDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "删除", permission = "admin:print:delete", permissionParentName = "系统管理", permissionName = "打印设置")
    public String delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "删除Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "详情", permission = "admin:print:detail", permissionParentName = "系统管理", permissionName = "打印设置")
    public PrintDO detail(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "绑定", permission = "admin:print:update", permissionParentName = "系统管理", permissionName = "打印设置")
        public Boolean updateStatus(
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId,
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "用户信息") Long id,
            @NotNull @HttpParam(name = "status", type = HttpParamType.COMMON, description = "用户信息") Integer status) throws Exception;

}

